package com.bwie.es.controller;

import com.bwie.common.domain.Ticket;
import com.bwie.common.domain.dto.TicketDTO;
import com.bwie.common.result.PageResult;
import com.bwie.common.result.Result;
import com.bwie.es.service.ESService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("es")
public class ESController {
    @Autowired
    private ESService eSService;

    @PostMapping("list")
    public Result<PageResult<Ticket>> list(@RequestBody TicketDTO ticketDTO){
        PageResult<Ticket> result=eSService.list(ticketDTO);
        return Result.success(result);
    }
}
